package controller;

import Pojo.Houselist;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import service.HouselistService;

/**
 * @Title:detailimgController
 * @Description;controller
 * @Auther:wzx
 * @create 2022/4/2-14:52
 **/

@Controller
public class detailimgController {

    @Autowired
    private HouselistService houselistService;

    @RequestMapping("/detail")
    public String detail(int userlistid, Model model){
        System.out.println(userlistid);
        Houselist houselist = houselistService.findid(userlistid);
        model.addAttribute("mainPage", "changehouse.jsp");
        model.addAttribute("houselist", houselist);
        return "detail";
    }

}
